package com.example.hospital.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 
 * @TableName queue
 */
@TableName(value ="queue")
public class Queue implements Serializable {
    /**
     * 
     */
    @TableId(value = "queue_id", type = IdType.AUTO)
    private Integer queueId;

    /**
     * 
     */
    @TableField(value = "appointment_id")
    private Integer appointmentId;

    /**
     * 
     */
    @TableField(value = "queue_number")
    private Integer queueNumber;

    /**
     * 
     */
    @TableField(value = "queue_time")
    private LocalDateTime queueTime;

    /**
     * 
     */
    @TableField(value = "called_status")
    private String calledStatus;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    /**
     * 
     */
    public Integer getQueueId() {
        return queueId;
    }

    /**
     * 
     */
    public void setQueueId(Integer queueId) {
        this.queueId = queueId;
    }

    /**
     * 
     */
    public Integer getAppointmentId() {
        return appointmentId;
    }

    /**
     * 
     */
    public void setAppointmentId(Integer appointmentId) {
        this.appointmentId = appointmentId;
    }

    /**
     * 
     */
    public Integer getQueueNumber() {
        return queueNumber;
    }

    /**
     * 
     */
    public void setQueueNumber(Integer queueNumber) {
        this.queueNumber = queueNumber;
    }

    /**
     * 
     */
    public LocalDateTime getQueueTime() {
        return queueTime;
    }

    /**
     * 
     */
    public void setQueueTime(LocalDateTime queueTime) {
        this.queueTime = queueTime;
    }

    /**
     * 
     */
    public String getCalledStatus() {
        return calledStatus;
    }

    /**
     * 
     */
    public void setCalledStatus(String calledStatus) {
        this.calledStatus = calledStatus;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Queue other = (Queue) that;
        return (this.getQueueId() == null ? other.getQueueId() == null : this.getQueueId().equals(other.getQueueId()))
            && (this.getAppointmentId() == null ? other.getAppointmentId() == null : this.getAppointmentId().equals(other.getAppointmentId()))
            && (this.getQueueNumber() == null ? other.getQueueNumber() == null : this.getQueueNumber().equals(other.getQueueNumber()))
            && (this.getQueueTime() == null ? other.getQueueTime() == null : this.getQueueTime().equals(other.getQueueTime()))
            && (this.getCalledStatus() == null ? other.getCalledStatus() == null : this.getCalledStatus().equals(other.getCalledStatus()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getQueueId() == null) ? 0 : getQueueId().hashCode());
        result = prime * result + ((getAppointmentId() == null) ? 0 : getAppointmentId().hashCode());
        result = prime * result + ((getQueueNumber() == null) ? 0 : getQueueNumber().hashCode());
        result = prime * result + ((getQueueTime() == null) ? 0 : getQueueTime().hashCode());
        result = prime * result + ((getCalledStatus() == null) ? 0 : getCalledStatus().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", queueId=").append(queueId);
        sb.append(", appointmentId=").append(appointmentId);
        sb.append(", queueNumber=").append(queueNumber);
        sb.append(", queueTime=").append(queueTime);
        sb.append(", calledStatus=").append(calledStatus);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}